/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.132_approval
 Source Server Type    : MySQL
 Source Server Version : 50725
 Source Host           : 192.168.1.132
 Source Database       : approval

 Target Server Type    : MySQL
 Target Server Version : 50725
 File Encoding         : utf-8

 Date: 06/17/2020 14:27:50 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `tp_approve_flow`
-- ----------------------------
DROP TABLE IF EXISTS `tp_approve_flow`;
CREATE TABLE `tp_approve_flow` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `apply_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '申请单号',
  `result` int(11) DEFAULT '1' COMMENT '审核状态 1-未审核 2-通过 3-驳回',
  `oper_type` int(11) DEFAULT NULL COMMENT '操作类型(1.提交 2.修改并提交 3.取消)',
  `flow_available` int(11) DEFAULT NULL COMMENT '流程是否废除(1未废除 2废除）',
  `res_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源id',
  `approval_dept_id` int(11) DEFAULT NULL COMMENT '审批部门id',
  `approval_role_id` int(11) DEFAULT NULL COMMENT '审批角色id',
  `current_flow_link` int(11) DEFAULT NULL COMMENT '审批流程节点id',
  `next_flow_link` int(11) DEFAULT NULL COMMENT '下一审批流程节点id',
  `user_id` int(11) DEFAULT NULL COMMENT '创建用户',
  `edition` int(11) DEFAULT '0' COMMENT '版本号',
  `audit_opinion` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '审核意见',
  `create_time` datetime DEFAULT NULL COMMENT '操作类型(1.提交 2.修改并提交 3.撤回 4.取消)',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `modify_user` int(11) DEFAULT NULL COMMENT '修改人员id',
  `appendix` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '附件',
  `cancel_user_id` int(11) DEFAULT NULL COMMENT '取消人员id',
  `config_his_num` int(11) DEFAULT NULL COMMENT '申请时关联的流程模板版本\r\n',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5259 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='审批记录';

-- ----------------------------
--  Records of `tp_approve_flow`
-- ----------------------------
BEGIN;
INSERT INTO `tp_approve_flow` VALUES ('5203', '20200420103608505327-500', '1', '1', '2', '[资源目录]-已归集500', null, null, null, null, '237', '1', null, '2020-04-20 10:36:09', null, null, null, null, null), ('5204', '20200420103608505327-500', '3', null, '2', '[资源目录]-已归集500', '1', '12', '1', '2', '237', '1', '请详细说明申请原因', '2020-04-20 10:36:09', '2020-04-20 11:21:44', '238', null, null, null), ('5205', '20200420103608505327-500', '1', '2', '1', '[资源目录]-已归集500', null, null, null, null, '237', '0', null, '2020-04-20 11:23:35', null, null, null, null, null), ('5206', '20200420103608505327-500', '2', null, '1', '[资源目录]-已归集500', '1', '12', '1', '2', '237', '0', '审核通过', '2020-04-20 11:23:35', '2020-04-20 11:24:05', '238', null, null, null), ('5207', '20200420103608505327-500', '2', null, '1', '[资源目录]-已归集500', '22997', '12', '2', null, '238', '0', '通过，请联系配合实施人员(章家栋：15503125874)', '2020-04-20 11:24:05', '2020-04-20 11:25:34', '234', null, null, null), ('5208', '20200420145317873961-501', '1', '1', '1', '[资源目录]-已归集501', null, null, null, null, '237', '0', null, '2020-04-20 14:53:18', null, null, null, null, null), ('5209', '20200420145317873961-501', '2', null, '1', '[资源目录]-已归集501', '1', '12', '1', '2', '237', '0', '准许申请。', '2020-04-20 14:53:18', '2020-04-21 10:44:15', '236', null, null, null), ('5210', '20200420150818689317-518', '1', '1', '1', '[资源目录]-未归集518', null, null, null, null, '237', '0', null, '2020-04-20 15:08:19', null, null, null, null, null), ('5211', '20200420150818689317-518', '2', null, '1', '[资源目录]-未归集518', '22997', '12', '1', null, '237', '0', '允许开放', '2020-04-20 15:08:19', '2020-04-20 15:09:09', '234', null, null, null), ('5212', '20200421104150664604-518', '1', '1', '1', '[资源目录]-已归集518', null, null, null, null, '237', '0', null, '2020-04-21 10:41:51', null, null, null, null, null), ('5213', '20200421104150664604-518', '2', null, '1', '[资源目录]-已归集518', '22997', '12', '1', null, '237', '0', '', '2020-04-21 10:41:51', '2020-04-27 11:10:38', '234', null, null, null), ('5214', '20200420145317873961-501', '2', null, '1', '[资源目录]-已归集501', '22997', '12', '2', null, '236', '0', '数据据通过。', '2020-04-21 10:44:15', '2020-04-21 10:52:44', '234', null, null, null), ('5215', '1587437800234-20200421105640234409', '1', '1', '1', '[资源目录]-IP501', null, null, null, null, '237', '0', null, '2020-04-21 10:57:00', null, null, null, null, null), ('5216', '1587437800234-20200421105640234409', '1', null, '1', '[资源目录]-IP501', '37', '12', '1', '2', '237', '0', '', '2020-04-21 10:57:00', '2020-04-21 15:41:04', '237', null, null, null), ('5225', '20200422101847599725-502', '1', '1', '1', '[资源目录]-已归集502', null, null, null, null, '237', '0', null, '2020-04-22 10:18:47', null, null, null, null, null), ('5226', '20200422101847599725-502', '2', null, '1', '[资源目录]-已归集502', '1', '12', '1', '2', '237', '0', '', '2020-04-22 10:18:47', '2020-04-22 10:19:30', '238', null, null, null), ('5227', '20200422101847599725-502', '2', null, '1', '[资源目录]-已归集502', '22997', '12', '2', null, '238', '0', '', '2020-04-22 10:19:30', '2020-04-22 10:19:49', '234', null, null, null), ('5230', '20200422162717374705-521', '1', '1', '1', '[资源目录]-未归集521', null, null, null, null, '234', '0', null, '2020-04-22 16:27:18', null, null, null, null, null), ('5231', '20200422162717374705-521', '1', null, '1', '[资源目录]-未归集521', '22997', '12', '1', null, '234', '0', null, '2020-04-22 16:27:18', null, null, null, null, null), ('5232', '20200422163806819280-522', '1', '1', '2', '[资源目录]-未归集522', null, null, null, null, '233', '0', null, '2020-04-22 16:38:07', '2020-06-15 11:19:04', null, null, '235', null), ('5233', '20200422163806819280-522', '2', null, '2', '[资源目录]-未归集522', '22997', '12', '1', null, '233', '0', '', '2020-04-22 16:38:07', '2020-06-15 11:19:04', '234', null, '235', null), ('5236', '20200422171749800747-501', '1', '1', '1', '[资源目录]-已归集501', null, null, null, null, '233', '0', null, '2020-04-22 17:17:50', null, null, null, null, null), ('5237', '20200422171749800747-501', '2', null, '1', '[资源目录]-已归集501', '1', '12', '1', '2', '233', '0', '', '2020-04-22 17:17:50', '2020-04-22 17:19:49', '236', null, null, null), ('5238', '20200422171749800747-501', '2', null, '1', '[资源目录]-已归集501', '22997', '12', '2', null, '236', '0', '', '2020-04-22 17:19:49', '2020-04-22 17:20:09', '234', null, null, null), ('5239', '20200422174813074244-500', '1', '1', '1', '[资源目录]-已归集500', null, null, null, null, '233', '0', null, '2020-04-22 17:48:13', null, null, null, null, null), ('5240', '20200422174813074244-500', '2', null, '1', '[资源目录]-已归集500', '1', '12', '1', '2', '233', '0', '', '2020-04-22 17:48:13', '2020-04-27 11:11:37', '236', null, null, null), ('5241', '1587893650712-20200426173410712354', '1', '1', '1', '[资源目录]-IP501', null, null, null, null, '233', '0', null, '2020-04-26 17:34:30', null, null, null, null, null), ('5242', '1587893650712-20200426173410712354', '1', null, '1', '[资源目录]-IP501', '37', '12', '1', '2', '233', '0', null, '2020-04-26 17:34:30', null, null, null, null, null), ('5243', '20200427110427741360-506', '1', '1', '1', '[资源目录]-已归集506', null, null, null, null, '233', '0', null, '2020-04-27 11:04:28', null, null, null, null, null), ('5244', '20200427110427741360-506', '2', null, '1', '[资源目录]-已归集506', '1', '12', '1', '2', '233', '0', '', '2020-04-27 11:04:28', '2020-04-27 11:11:35', '236', null, null, null), ('5245', '20200427110427741360-506', '2', null, '1', '[资源目录]-已归集506', '22997', '12', '2', null, '236', '0', '', '2020-04-27 11:11:35', '2020-04-27 11:11:59', '234', null, null, null), ('5246', '20200422174813074244-500', '2', null, '1', '[资源目录]-已归集500', '22997', '12', '2', null, '236', '0', '', '2020-04-27 11:11:37', '2020-04-27 11:12:01', '234', null, null, null), ('5247', '20200427114645878479-502', '1', '1', '1', '[资源目录]-已归集502', null, null, null, null, '233', '0', null, '2020-04-27 11:46:46', null, null, null, null, null), ('5248', '20200427114645878479-502', '1', null, '1', '[资源目录]-已归集502', '1', '12', '1', '2', '233', '0', null, '2020-04-27 11:46:46', null, null, null, null, null), ('5249', '20200427160527558468-523', '1', '1', '1', '[资源目录]-已归集523', null, null, null, null, '233', '0', null, '2020-04-27 16:05:28', null, null, null, null, null), ('5250', '20200427160527558468-523', '2', null, '1', '[资源目录]-已归集523', '22997', '12', '1', null, '233', '0', '准许', '2020-04-27 16:05:28', '2020-04-27 16:06:50', '234', null, null, null), ('5251', '20200427160608252425-524', '1', '1', '1', '[资源目录]-已归集524', null, null, null, null, '233', '0', null, '2020-04-27 16:06:08', null, null, null, null, null), ('5252', '20200427160608252425-524', '2', null, '1', '[资源目录]-已归集524', '22997', '12', '1', null, '233', '0', '可以', '2020-04-27 16:06:09', '2020-04-27 16:06:43', '234', null, null, null), ('5257', '20200611140241583107', '1', '1', '1', '[事项录入]504', null, null, null, null, '1', '0', null, '2020-06-11 14:02:42', null, null, null, null, null), ('5258', '20200611140241583107', '1', null, '1', '[事项录入]504', '1', '12', '1', '2', '1', '0', null, '2020-06-11 14:02:42', null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `tp_approve_flow_config`
-- ----------------------------
DROP TABLE IF EXISTS `tp_approve_flow_config`;
CREATE TABLE `tp_approve_flow_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `res_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源id',
  `audit_department_id` int(11) DEFAULT NULL COMMENT '审核部门id',
  `audit_role_id` int(11) DEFAULT NULL COMMENT '审核角色id',
  `current_flow_link` int(11) DEFAULT NULL COMMENT '当前环节',
  `next_flow_node` int(11) DEFAULT NULL COMMENT '下个流程节点id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1517 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='流程配置';

-- ----------------------------
--  Records of `tp_approve_flow_config`
-- ----------------------------
BEGIN;
INSERT INTO `tp_approve_flow_config` VALUES ('1477', '1', '[资源目录]-已归集500', '1', '12', '1', '2', '2020-04-18 21:41:10'), ('1478', '1', '[资源目录]-已归集500', '22997', '12', '2', null, '2020-04-18 21:41:10'), ('1479', '2', '[资源目录]-已归集501', '1', '12', '1', '2', '2020-04-20 14:25:24'), ('1480', '2', '[资源目录]-已归集501', '22997', '12', '2', null, '2020-04-20 14:25:24'), ('1481', '3', '[资源目录]-未归集518', '22997', '12', '1', null, '2020-04-20 15:06:53'), ('1482', '4', '[资源目录]-已归集518', '22997', '12', '1', null, '2020-04-20 15:12:44'), ('1483', '5', '[资源目录]-已归集502', '1', '12', '1', '2', '2020-04-20 15:32:50'), ('1484', '5', '[资源目录]-已归集502', '22997', '12', '2', null, '2020-04-20 15:32:50'), ('1485', '6', '[资源目录]-已归集503', '1', '12', '1', '2', '2020-04-20 15:38:45'), ('1486', '6', '[资源目录]-已归集503', '22997', '12', '2', null, '2020-04-20 15:38:45'), ('1487', '7', '[资源目录]-已归集504', '22997', '12', '1', null, '2020-04-20 15:38:52'), ('1488', '8', '[资源目录]-已归集505', '1', '12', '1', '2', '2020-04-21 14:33:49'), ('1489', '8', '[资源目录]-已归集505', '22997', '12', '2', null, '2020-04-21 14:33:49'), ('1497', '9', '[资源目录]-未归集521', '22997', '12', '1', null, '2020-04-22 16:18:01'), ('1499', '10', '[资源目录]-未归集522', '22997', '12', '1', null, '2020-04-22 16:37:04'), ('1500', '11', '[资源目录]-已归集506', '1', '12', '1', '2', '2020-04-22 19:02:33'), ('1501', '11', '[资源目录]-已归集506', '22997', '12', '2', null, '2020-04-22 19:02:33'), ('1504', '13', '[资源目录]-已归集510', null, '12', '1', '2', '2020-04-24 10:25:12'), ('1505', '13', '[资源目录]-已归集510', '22997', '12', '2', null, '2020-04-24 10:25:12'), ('1506', '14', '[资源目录]-已归集507', '1', '12', '1', '2', '2020-04-24 10:31:53'), ('1507', '14', '[资源目录]-已归集507', '22997', '12', '2', null, '2020-04-24 10:31:53'), ('1508', '15', '[资源目录]-已归集514', null, '12', '1', '2', '2020-04-24 10:33:29'), ('1509', '15', '[资源目录]-已归集514', '22997', '12', '2', null, '2020-04-24 10:33:29'), ('1510', '16', '[资源目录]-已归集511', '22997', '12', '1', null, '2020-04-24 11:39:17'), ('1511', '17', '[资源目录]-已归集523', '22997', '12', '1', null, '2020-04-27 15:47:42'), ('1512', '18', '[资源目录]-已归集524', '22997', '12', '1', null, '2020-04-27 15:50:00'), ('1513', '19', '[事项录入]', '1', '12', '1', '2', '2020-06-11 14:00:36'), ('1514', '19', '[事项录入]', '22997', '12', '2', null, '2020-06-11 14:01:04'), ('1515', '20', '政务超市44', '1001', '27', '1', '2', '2020-06-11 14:22:49'), ('1516', '20', '政务超市44', '1001', '22', '2', null, '2020-06-11 14:22:49');
COMMIT;

-- ----------------------------
--  Table structure for `tp_config_old`
-- ----------------------------
DROP TABLE IF EXISTS `tp_config_old`;
CREATE TABLE `tp_config_old` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `history_num` int(11) DEFAULT NULL COMMENT '同一资源的流程编号',
  `res_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源id',
  `audit_department_id` int(11) DEFAULT NULL COMMENT '审核部门id',
  `audit_role_id` int(11) DEFAULT NULL COMMENT '审核角色id',
  `current_flow_link` int(11) DEFAULT NULL COMMENT '当前环节',
  `next_flow_node` int(11) DEFAULT NULL COMMENT '下个流程节点id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `move_user` int(11) DEFAULT NULL COMMENT '迁移人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `tp_order`
-- ----------------------------
DROP TABLE IF EXISTS `tp_order`;
CREATE TABLE `tp_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `application_num` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '申请单号',
  `res_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源id(此单号申请的资源，可多条)',
  `gs_order_state` int(11) DEFAULT NULL COMMENT '当前状态（1未提交、2待审批 3接收mq、4审批中、5已撤回、6审批通过、7已驳回）',
  `order_available` int(11) DEFAULT NULL COMMENT '是否可用（1可用 2不可用）<修改后新增，原来的作废>',
  `config_his_num` int(11) DEFAULT NULL COMMENT '申请时关联的流程模板版本',
  `apply_time` datetime DEFAULT NULL COMMENT '申请时间',
  `cancel_user_id` int(11) DEFAULT NULL COMMENT '取消人员id',
  `modify_time` datetime DEFAULT NULL COMMENT '修改时间',
  `modify_user` int(11) DEFAULT NULL COMMENT '修改人id',
  `apply_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '申请标题',
  `res_apply_type` int(11) DEFAULT NULL COMMENT '资源目录专用字段：订单类型(1.已上线资源申请使用  2.未上线资源申请上线)',
  `res_state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源权限（受限、公开）',
  `res_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '资源类型（页面资源，交换资源，服务资源）',
  `res_count` int(255) DEFAULT NULL COMMENT '资源数量',
  `applicant_dept` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '申请部门',
  `applicant_id` int(11) DEFAULT NULL COMMENT '申请人id',
  `contacts_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '联系人姓名',
  `contacts_cell_phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '联系人手机',
  `application_note` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '申请说明',
  `appendix` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '附件',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4413 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='资源申请表';

-- ----------------------------
--  Records of `tp_order`
-- ----------------------------
BEGIN;
INSERT INTO `tp_order` VALUES ('4389', '20200420103608505327-500', '[资源目录]-已归集500', '7', '2', null, '2020-04-20 10:36:09', null, '2020-04-20 11:23:35', '237', null, null, null, null, null, null, null, null, null, null, null), ('4390', '20200420103608505327-500', '[资源目录]-已归集500', '6', '1', null, '2020-04-20 11:23:35', null, '2020-04-20 11:25:34', null, null, null, null, null, null, null, null, null, null, null, null), ('4391', '20200420145317873961-501', '[资源目录]-已归集501', '6', '1', null, '2020-04-20 14:53:18', null, '2020-04-21 10:52:44', null, null, null, null, null, null, null, null, null, null, null, null), ('4392', '20200420150818689317-518', '[资源目录]-未归集518', '6', '1', null, '2020-04-20 15:08:19', null, '2020-04-20 15:09:09', null, null, null, null, null, null, null, null, null, null, null, null), ('4393', '20200421104150664604-518', '[资源目录]-已归集518', '6', '1', null, '2020-04-21 10:41:51', null, '2020-04-27 11:10:38', null, null, null, null, null, null, null, null, null, null, null, null), ('4394', '1587437800234-20200421105640234409', '[资源目录]-IP501', '4', '1', null, '2020-04-21 10:57:00', null, '2020-04-21 15:41:04', null, null, null, null, null, null, null, null, null, null, null, null), ('4396', '20200422101847599725-502', '[资源目录]-已归集502', '6', '1', null, '2020-04-22 10:18:47', null, '2020-04-22 10:19:49', null, null, null, null, null, null, null, null, null, null, null, null), ('4398', '20200422162717374705-521', '[资源目录]-未归集521', '3', '1', null, '2020-04-22 16:27:18', null, null, null, null, null, null, null, null, null, null, null, null, null, null), ('4399', '20200422163806819280-522', '[资源目录]-未归集522', '5', '1', null, '2020-04-22 16:38:07', '235', '2020-06-15 11:19:04', null, null, null, null, null, null, null, null, null, null, null, null), ('4401', '20200422171749800747-501', '[资源目录]-已归集501', '6', '1', null, '2020-04-22 17:17:50', null, '2020-04-22 17:20:09', null, null, null, null, null, null, null, null, null, null, null, null), ('4402', '20200422174813074244-500', '[资源目录]-已归集500', '6', '1', null, '2020-04-22 17:48:13', null, '2020-04-27 11:12:01', null, null, null, null, null, null, null, null, null, null, null, null), ('4403', '1587893650712-20200426173410712354', '[资源目录]-IP501', '3', '1', null, '2020-04-26 17:34:30', null, null, null, null, null, null, null, null, null, null, null, null, null, null), ('4404', '20200427110427741360-506', '[资源目录]-已归集506', '6', '1', null, '2020-04-27 11:04:28', null, '2020-04-27 11:11:59', null, null, null, null, null, null, null, null, null, null, null, null), ('4405', '20200427114645878479-502', '[资源目录]-已归集502', '3', '1', null, '2020-04-27 11:46:46', null, null, null, null, null, null, null, null, null, null, null, null, null, null), ('4406', '20200427160527558468-523', '[资源目录]-已归集523', '6', '1', null, '2020-04-27 16:05:28', null, '2020-04-27 16:06:50', null, null, null, null, null, null, null, null, null, null, null, null), ('4407', '20200427160608252425-524', '[资源目录]-已归集524', '6', '1', null, '2020-04-27 16:06:08', null, '2020-04-27 16:06:43', null, null, null, null, null, null, null, null, null, null, null, null), ('4412', '20200611140241583107', '[事项录入]504', '1', '1', null, '2020-06-11 14:02:42', null, null, null, null, null, null, '事项录入', null, null, null, null, null, null, null);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
